<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>Basic Math Functions for Neural Network Computation</title>
<title>CMSIS-NN: Basic Math Functions for Neural Network Computation</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="cmsis.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<script type="text/javascript" src="printComponentTabs.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 46px;">
  <td id="projectlogo"><img alt="Logo" src="CMSIS_Logo_Final.png"/></td>
  <td style="padding-left: 0.5em;">
   <div id="projectname">CMSIS-NN
   &#160;<span id="projectnumber">Version 1.2.0</span>
   </div>
   <div id="projectbrief">CMSIS NN Software Library</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<div id="CMSISnav" class="tabs1">
    <ul class="tablist">
      <script type="text/javascript">
		<!--
		writeComponentTabs.call(this);
		//-->
      </script>
	  </ul>
</div>
<!-- Generated by Doxygen 1.8.17 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(document).ready(function(){initNavTree('group__NNBasicMath.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">Basic Math Functions for Neural Network Computation</div>  </div>
</div><!--header-->
<div class="contents">

<p>Basic Math Functions for Neural Network Computation.  
<a href="#details">More...</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:ga379c39e614f1468e1fdb524f51fb6061"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__NNBasicMath.html#ga379c39e614f1468e1fdb524f51fb6061">arm_nn_accumulate_q7_to_q15</a> (q15_t *pDst, const q7_t *pSrc, uint32_t length)</td></tr>
<tr class="memdesc:ga379c39e614f1468e1fdb524f51fb6061"><td class="mdescLeft">&#160;</td><td class="mdescRight">Converts the elements from a q7 vector and accumulate to a q15 vector.  <a href="group__NNBasicMath.html#ga379c39e614f1468e1fdb524f51fb6061">More...</a><br /></td></tr>
<tr class="separator:ga379c39e614f1468e1fdb524f51fb6061"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gae65bde3218210820d789659179e14ce3"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__NNBasicMath.html#gae65bde3218210820d789659179e14ce3">arm_nn_add_q7</a> (const q7_t *input, q31_t *output, uint32_t block_size)</td></tr>
<tr class="memdesc:gae65bde3218210820d789659179e14ce3"><td class="mdescLeft">&#160;</td><td class="mdescRight">Non-saturating addition of elements of a q7 vector.  <a href="group__NNBasicMath.html#gae65bde3218210820d789659179e14ce3">More...</a><br /></td></tr>
<tr class="separator:gae65bde3218210820d789659179e14ce3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga5224f2f155a59498c97f4d62ae726ea5"><td class="memItemLeft" align="right" valign="top">arm_status&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__NNBasicMath.html#ga5224f2f155a59498c97f4d62ae726ea5">arm_nn_mat_mul_core_1x_s8</a> (int32_t row_elements, const int8_t *row_base, const int8_t *col_base, int32_t *const sum_col, int32_t *const output)</td></tr>
<tr class="memdesc:ga5224f2f155a59498c97f4d62ae726ea5"><td class="mdescLeft">&#160;</td><td class="mdescRight">General Matrix-multiplication without requantization for one row &amp; one column.  <a href="group__NNBasicMath.html#ga5224f2f155a59498c97f4d62ae726ea5">More...</a><br /></td></tr>
<tr class="separator:ga5224f2f155a59498c97f4d62ae726ea5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gae893fd2b0fadf44bcd2870ca2c2c3634"><td class="memItemLeft" align="right" valign="top">arm_status&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__NNBasicMath.html#gae893fd2b0fadf44bcd2870ca2c2c3634">arm_nn_mat_mul_core_4x_s8</a> (const int32_t row_elements, const int32_t offset, const int8_t *row_base, const int8_t *col_base, int32_t *const sum_col, int32_t *const output)</td></tr>
<tr class="memdesc:gae893fd2b0fadf44bcd2870ca2c2c3634"><td class="mdescLeft">&#160;</td><td class="mdescRight">General Matrix-multiplication without requantization for four rows and one column.  <a href="group__NNBasicMath.html#gae893fd2b0fadf44bcd2870ca2c2c3634">More...</a><br /></td></tr>
<tr class="separator:gae893fd2b0fadf44bcd2870ca2c2c3634"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga360cdaa16c399e3bfbeaaa7296c326e1"><td class="memItemLeft" align="right" valign="top">arm_status&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__NNBasicMath.html#ga360cdaa16c399e3bfbeaaa7296c326e1">arm_nn_mat_mult_nt_t_s8</a> (const q7_t *lhs, const q7_t *rhs, const q31_t *bias, q7_t *dst, const int32_t *dst_multipliers, const int32_t *dst_shifts, const int32_t lhs_rows, const int32_t rhs_rows, const int32_t rhs_cols, const int32_t lhs_offset, const int32_t dst_offset, const int32_t activation_min, const int32_t activation_max)</td></tr>
<tr class="memdesc:ga360cdaa16c399e3bfbeaaa7296c326e1"><td class="mdescLeft">&#160;</td><td class="mdescRight">General Matrix-multiplication function with per-channel requantization. This function assumes:  <a href="group__NNBasicMath.html#ga360cdaa16c399e3bfbeaaa7296c326e1">More...</a><br /></td></tr>
<tr class="separator:ga360cdaa16c399e3bfbeaaa7296c326e1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga08f8340aa6533271b3aa6d211614fe22"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__NNBasicMath.html#ga08f8340aa6533271b3aa6d211614fe22">arm_nn_mult_q15</a> (q15_t *pSrcA, q15_t *pSrcB, q15_t *pDst, const uint16_t out_shift, uint32_t blockSize)</td></tr>
<tr class="memdesc:ga08f8340aa6533271b3aa6d211614fe22"><td class="mdescLeft">&#160;</td><td class="mdescRight">Q7 vector multiplication with variable output shifts.  <a href="group__NNBasicMath.html#ga08f8340aa6533271b3aa6d211614fe22">More...</a><br /></td></tr>
<tr class="separator:ga08f8340aa6533271b3aa6d211614fe22"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gad46c9ab012cceda8ce6681c687a58c70"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__NNBasicMath.html#gad46c9ab012cceda8ce6681c687a58c70">arm_nn_mult_q7</a> (q7_t *pSrcA, q7_t *pSrcB, q7_t *pDst, const uint16_t out_shift, uint32_t blockSize)</td></tr>
<tr class="memdesc:gad46c9ab012cceda8ce6681c687a58c70"><td class="mdescLeft">&#160;</td><td class="mdescRight">Q7 vector multiplication with variable output shifts.  <a href="group__NNBasicMath.html#gad46c9ab012cceda8ce6681c687a58c70">More...</a><br /></td></tr>
<tr class="separator:gad46c9ab012cceda8ce6681c687a58c70"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gacbc28cf23c7549bcf89d1e8f1481c389"><td class="memItemLeft" align="right" valign="top">arm_status&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__NNBasicMath.html#gacbc28cf23c7549bcf89d1e8f1481c389">arm_nn_vec_mat_mult_t_s8</a> (const q7_t *lhs, const q7_t *rhs, const q31_t *bias, q7_t *dst, const int32_t lhs_offset, const int32_t rhs_offset, const int32_t dst_offset, const int32_t dst_multiplier, const int32_t dst_shift, const int32_t rhs_cols, const int32_t rhs_rows, const int32_t activation_min, const int32_t activation_max)</td></tr>
<tr class="memdesc:gacbc28cf23c7549bcf89d1e8f1481c389"><td class="mdescLeft">&#160;</td><td class="mdescRight">s8 Vector by Matrix (transposed) multiplication  <a href="group__NNBasicMath.html#gacbc28cf23c7549bcf89d1e8f1481c389">More...</a><br /></td></tr>
<tr class="separator:gacbc28cf23c7549bcf89d1e8f1481c389"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Description</h2>
<h2 class="groupheader">Function Documentation</h2>
<a id="ga379c39e614f1468e1fdb524f51fb6061"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga379c39e614f1468e1fdb524f51fb6061">&#9670;&nbsp;</a></span>arm_nn_accumulate_q7_to_q15()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void arm_nn_accumulate_q7_to_q15 </td>
          <td>(</td>
          <td class="paramtype">q15_t *&#160;</td>
          <td class="paramname"><em>dst</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const q7_t *&#160;</td>
          <td class="paramname"><em>src</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>block_size</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">*src</td><td>points to the q7 input vector </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">*dst</td><td>points to the q15 output vector </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">block_size</td><td>length of the input vector</td></tr>
  </table>
  </dd>
</dl>
<dl class="section user"><dt>Description:</dt><dd></dd></dl>
<p>The equation used for the conversion process is:</p>
<pre>
 dst[n] += (q15_t) src[n] ;   0 &lt;= n &lt; block_size.
</pre> 
<p class="reference">References <a class="el" href="arm__nnsupportfunctions_8h.html#a9d505dfe68f4486c2327df8a857a89ad">arm_nn_read_q15x2()</a>, and <a class="el" href="arm__nnsupportfunctions_8h.html#ac9f7be20432a6926ac07c1f44b1b02fe">arm_nn_read_q7x4_ia()</a>.</p>

</div>
</div>
<a id="gae65bde3218210820d789659179e14ce3"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gae65bde3218210820d789659179e14ce3">&#9670;&nbsp;</a></span>arm_nn_add_q7()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void arm_nn_add_q7 </td>
          <td>(</td>
          <td class="paramtype">const q7_t *&#160;</td>
          <td class="paramname"><em>input</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">q31_t *&#160;</td>
          <td class="paramname"><em>output</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>block_size</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">*input</td><td>Pointer to the q7 input vector </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">*output</td><td>Pointer to the q31 output variable. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">block_size</td><td>length of the input vector </td></tr>
  </table>
  </dd>
</dl>
<dl class="section user"><dt>Description:</dt><dd></dd></dl>
<p>2^24 samples can be added without saturating the result.</p>
<p>The equation used for the conversion process is:</p>
<pre>
 sum = input[0] + input[1] + .. + input[block_size -1]
</pre> 
<p class="reference">References <a class="el" href="arm__nnsupportfunctions_8h.html#ac9f7be20432a6926ac07c1f44b1b02fe">arm_nn_read_q7x4_ia()</a>.</p>

</div>
</div>
<a id="ga5224f2f155a59498c97f4d62ae726ea5"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga5224f2f155a59498c97f4d62ae726ea5">&#9670;&nbsp;</a></span>arm_nn_mat_mul_core_1x_s8()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">arm_status arm_nn_mat_mul_core_1x_s8 </td>
          <td>(</td>
          <td class="paramtype">int32_t&#160;</td>
          <td class="paramname"><em>row_elements</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const int8_t *&#160;</td>
          <td class="paramname"><em>row_base</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const int8_t *&#160;</td>
          <td class="paramname"><em>col_base</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int32_t *const&#160;</td>
          <td class="paramname"><em>sum_col</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int32_t *const&#160;</td>
          <td class="paramname"><em>output</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">row_elements</td><td>number of row elements </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">row_base</td><td>pointer to row operand </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">col_base</td><td>pointer to col operand </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">sum_col</td><td>pointer to store sum of column elements </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">output</td><td>pointer to store result of multiply-accumulate </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The function returns the multiply-accumulated result of the row by column.</dd></dl>
<p>Pseudo-code *output = 0 sum_col = 0 for (i = 0; i &lt; row_elements; i++) *output += row_base[i] * col_base[i] sum_col += col_base[i] </p>

<p class="reference">Referenced by <a class="el" href="group__NNConv.html#ga2d9c129189832572cf0bc97ff9e73e54">arm_convolve_1_x_n_s8()</a>, and <a class="el" href="group__NNConv.html#gadfcad0bae34328dc806dc88cde173faa">arm_convolve_1x1_s8_fast()</a>.</p>

</div>
</div>
<a id="gae893fd2b0fadf44bcd2870ca2c2c3634"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gae893fd2b0fadf44bcd2870ca2c2c3634">&#9670;&nbsp;</a></span>arm_nn_mat_mul_core_4x_s8()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">arm_status arm_nn_mat_mul_core_4x_s8 </td>
          <td>(</td>
          <td class="paramtype">const int32_t&#160;</td>
          <td class="paramname"><em>row_elements</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const int32_t&#160;</td>
          <td class="paramname"><em>offset</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const int8_t *&#160;</td>
          <td class="paramname"><em>row_base</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const int8_t *&#160;</td>
          <td class="paramname"><em>col_base</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int32_t *const&#160;</td>
          <td class="paramname"><em>sum_col</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int32_t *const&#160;</td>
          <td class="paramname"><em>output</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">row_elements</td><td>number of row elements </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">offset</td><td>offset between rows. Can be the same as row_elements. For e.g, in a 1x1 conv scenario with stride as 1. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">row_base</td><td>pointer to row operand </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">col_base</td><td>pointer to col operand </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">sum_col</td><td>pointer to store sum of column elements </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">output</td><td>pointer to store result(4 int32's) of multiply-accumulate </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The function returns the multiply-accumulated result of the row by column</dd></dl>
<p>Pseudo-code output[0] = 0 .. output[3] = 0 sum_col = 0 for (i = 0; i &lt; row_elements; i++) output[0] += row_base[i] * col_base[i] .. output[3] += row_base[i + (row_elements * 3)] * col_base[i] sum_col += col_base[i] </p>

<p class="reference">Referenced by <a class="el" href="group__NNConv.html#ga2d9c129189832572cf0bc97ff9e73e54">arm_convolve_1_x_n_s8()</a>, <a class="el" href="group__NNConv.html#gadfcad0bae34328dc806dc88cde173faa">arm_convolve_1x1_s8_fast()</a>, and <a class="el" href="group__NNConv.html#ga6a0b2161ece62078228ead2d85bbcf28">arm_convolve_s8()</a>.</p>

</div>
</div>
<a id="ga360cdaa16c399e3bfbeaaa7296c326e1"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga360cdaa16c399e3bfbeaaa7296c326e1">&#9670;&nbsp;</a></span>arm_nn_mat_mult_nt_t_s8()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">arm_status arm_nn_mat_mult_nt_t_s8 </td>
          <td>(</td>
          <td class="paramtype">const q7_t *&#160;</td>
          <td class="paramname"><em>lhs</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const q7_t *&#160;</td>
          <td class="paramname"><em>rhs</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const q31_t *&#160;</td>
          <td class="paramname"><em>bias</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">q7_t *&#160;</td>
          <td class="paramname"><em>dst</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const int32_t *&#160;</td>
          <td class="paramname"><em>dst_multipliers</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const int32_t *&#160;</td>
          <td class="paramname"><em>dst_shifts</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const int32_t&#160;</td>
          <td class="paramname"><em>lhs_rows</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const int32_t&#160;</td>
          <td class="paramname"><em>rhs_rows</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const int32_t&#160;</td>
          <td class="paramname"><em>rhs_cols</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const int32_t&#160;</td>
          <td class="paramname"><em>lhs_offset</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const int32_t&#160;</td>
          <td class="paramname"><em>dst_offset</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const int32_t&#160;</td>
          <td class="paramname"><em>activation_min</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const int32_t&#160;</td>
          <td class="paramname"><em>activation_max</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<ul>
<li>LHS input matrix NOT transposed (nt)</li>
<li>RHS input matrix transposed (t)</li>
</ul>
<dl class="section note"><dt>Note</dt><dd>This operation also performs the broadcast bias addition before the requantization</dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">lhs</td><td>Pointer to the LHS input matrix </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">rhs</td><td>Pointer to the RHS input matrix </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">bias</td><td>Pointer to the bias vector. The length of this vector is equal to the number of output columns (or RHS input rows) </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">dst</td><td>Pointer to the output matrix with "m" rows and "n" columns </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">dst_multipliers</td><td>Pointer to the multipliers vector needed for the per-channel requantization. The length of this vector is equal to the number of output columns (or RHS input rows) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">dst_shifts</td><td>Pointer to the shifts vector needed for the per-channel requantization. The length of this vector is equal to the number of output columns (or RHS input rows) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">lhs_rows</td><td>Number of LHS input rows </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">rhs_rows</td><td>Number of RHS input rows </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">rhs_cols</td><td>Number of LHS/RHS input columns </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">lhs_offset</td><td>Offset to be applied to the LHS input value </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">dst_offset</td><td>Offset to be applied the output result </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">activation_min</td><td>Minimum value to clamp down the output. Range : int8 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">activation_max</td><td>Maximum value to clamp up the output. Range : int8</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The function returns <code>ARM_MATH_SUCCESS</code> </dd></dl>

<p class="reference">References <a class="el" href="arm__nnsupportfunctions_8h.html#a31fa46f17212fbcb65d2cdae06fc08f5">arm_nn_read_q7x4()</a>, <a class="el" href="arm__nnsupportfunctions_8h.html#ac9f7be20432a6926ac07c1f44b1b02fe">arm_nn_read_q7x4_ia()</a>, <a class="el" href="arm__nnsupportfunctions_8h.html#a6a13b7a567485da5fc7f0d311318886d">arm_nn_requantize()</a>, <a class="el" href="arm__nnsupportfunctions_8h.html#ad935f1ff1a50822e317bdb321ce991ad">MAX</a>, and <a class="el" href="arm__nnsupportfunctions_8h.html#adcd021ac91d43a62b2cdecf9a5b971a7">MIN</a>.</p>

<p class="reference">Referenced by <a class="el" href="group__NNConv.html#gadfcad0bae34328dc806dc88cde173faa">arm_convolve_1x1_s8_fast()</a>.</p>

</div>
</div>
<a id="ga08f8340aa6533271b3aa6d211614fe22"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga08f8340aa6533271b3aa6d211614fe22">&#9670;&nbsp;</a></span>arm_nn_mult_q15()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void arm_nn_mult_q15 </td>
          <td>(</td>
          <td class="paramtype">q15_t *&#160;</td>
          <td class="paramname"><em>pSrcA</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">q15_t *&#160;</td>
          <td class="paramname"><em>pSrcB</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">q15_t *&#160;</td>
          <td class="paramname"><em>pDst</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const uint16_t&#160;</td>
          <td class="paramname"><em>out_shift</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>blockSize</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>q7 vector multiplication with variable output shifts</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">*pSrcA</td><td>pointer to the first input vector </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">*pSrcB</td><td>pointer to the second input vector </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">*pDst</td><td>pointer to the output vector </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">out_shift</td><td>amount of right-shift for output </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">blockSize</td><td>number of samples in each vector</td></tr>
  </table>
  </dd>
</dl>
<p><b>Scaling and Overflow Behavior:</b> </p><dl class="section user"><dt></dt><dd>The function uses saturating arithmetic. Results outside of the allowable Q15 range [0x8000 0x7FFF] will be saturated. </dd></dl>

<p class="reference">References <a class="el" href="arm__nnsupportfunctions_8h.html#afdda94a339b76615d3161e9fc63f4d21">arm_nn_read_q15x2_ia()</a>, and <a class="el" href="arm__nnsupportfunctions_8h.html#a4cbd428a2b4a4f6b2a6e4219520c7ce0">NN_ROUND</a>.</p>

</div>
</div>
<a id="gad46c9ab012cceda8ce6681c687a58c70"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gad46c9ab012cceda8ce6681c687a58c70">&#9670;&nbsp;</a></span>arm_nn_mult_q7()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void arm_nn_mult_q7 </td>
          <td>(</td>
          <td class="paramtype">q7_t *&#160;</td>
          <td class="paramname"><em>pSrcA</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">q7_t *&#160;</td>
          <td class="paramname"><em>pSrcB</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">q7_t *&#160;</td>
          <td class="paramname"><em>pDst</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const uint16_t&#160;</td>
          <td class="paramname"><em>out_shift</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>blockSize</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>q7 vector multiplication with variable output shifts</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">*pSrcA</td><td>pointer to the first input vector </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">*pSrcB</td><td>pointer to the second input vector </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">*pDst</td><td>pointer to the output vector </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">out_shift</td><td>amount of right-shift for output </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">blockSize</td><td>number of samples in each vector</td></tr>
  </table>
  </dd>
</dl>
<p><b>Scaling and Overflow Behavior:</b> </p><dl class="section user"><dt></dt><dd>The function uses saturating arithmetic. Results outside of the allowable Q7 range [0x80 0x7F] will be saturated. </dd></dl>

<p class="reference">References <a class="el" href="arm__nnsupportfunctions_8h.html#a4cbd428a2b4a4f6b2a6e4219520c7ce0">NN_ROUND</a>.</p>

</div>
</div>
<a id="gacbc28cf23c7549bcf89d1e8f1481c389"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gacbc28cf23c7549bcf89d1e8f1481c389">&#9670;&nbsp;</a></span>arm_nn_vec_mat_mult_t_s8()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">arm_status arm_nn_vec_mat_mult_t_s8 </td>
          <td>(</td>
          <td class="paramtype">const q7_t *&#160;</td>
          <td class="paramname"><em>lhs</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const q7_t *&#160;</td>
          <td class="paramname"><em>rhs</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const q31_t *&#160;</td>
          <td class="paramname"><em>bias</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">q7_t *&#160;</td>
          <td class="paramname"><em>dst</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const int32_t&#160;</td>
          <td class="paramname"><em>lhs_offset</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const int32_t&#160;</td>
          <td class="paramname"><em>rhs_offset</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const int32_t&#160;</td>
          <td class="paramname"><em>dst_offset</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const int32_t&#160;</td>
          <td class="paramname"><em>dst_multiplier</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const int32_t&#160;</td>
          <td class="paramname"><em>dst_shift</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const int32_t&#160;</td>
          <td class="paramname"><em>rhs_cols</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const int32_t&#160;</td>
          <td class="paramname"><em>rhs_rows</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const int32_t&#160;</td>
          <td class="paramname"><em>activation_min</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const int32_t&#160;</td>
          <td class="paramname"><em>activation_max</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">lhs</td><td>Input left-hand side vector </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">rhs</td><td>Input right-hand side matrix (transposed) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">bias</td><td>Input bias </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">dst</td><td>Output vector </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">lhs_offset</td><td>Offset to be added to the input values of the left-hand side vector. Range: -127 to 128 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">rhs_offset</td><td>Offset to be added to the input values of the right-hand side matrix. Range: -127 to 128 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">dst_offset</td><td>Offset to be added to the output values. Range: -127 to 128 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">dst_multiplier</td><td>Output multiplier </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">dst_shift</td><td>Output shift </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">rhs_cols</td><td>Number of columns in the right-hand side input matrix </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">rhs_rows</td><td>Number of rows in the right-hand side input matrix </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">activation_min</td><td>Minimum value to clamp the output to. Range: int8 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">activation_max</td><td>Maximum value to clamp the output to. Range: int8</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The function returns <code>ARM_MATH_SUCCESS</code> </dd></dl>

<p class="reference">References <a class="el" href="arm__nnsupportfunctions_8h.html#a31fa46f17212fbcb65d2cdae06fc08f5">arm_nn_read_q7x4()</a>, <a class="el" href="arm__nnsupportfunctions_8h.html#ac9f7be20432a6926ac07c1f44b1b02fe">arm_nn_read_q7x4_ia()</a>, <a class="el" href="arm__nnsupportfunctions_8h.html#a6a13b7a567485da5fc7f0d311318886d">arm_nn_requantize()</a>, <a class="el" href="arm__nnsupportfunctions_8h.html#ad935f1ff1a50822e317bdb321ce991ad">MAX</a>, and <a class="el" href="arm__nnsupportfunctions_8h.html#adcd021ac91d43a62b2cdecf9a5b971a7">MIN</a>.</p>

<p class="reference">Referenced by <a class="el" href="group__FC.html#ga2e580c510d9dc26a2e8e422f805b9bc0">arm_fully_connected_s8()</a>.</p>

</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="footer">Generated on Tue Mar 17 2020 15:01:26 for CMSIS-NN Version 1.2.0 by Arm Ltd. All rights reserved.
	<!--
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.17 
	-->
	</li>
  </ul>
</div>
</body>
</html>
